<%--商城的首页--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>华为手机商城</title>
    <link rel="stylesheet" href="../../static/shopping/css/style.css">
    <script src="../../static/shopping/js/jquery-1.8.3.min.js"></script>
    <script src="../../static/shopping/js/banner.js"></script>
    <link href="../../static/boostrap/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="../../static/boostrap/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</head>
<body>
<%--
使用bootstap的栅格系统
container容器与container-fluid容器的区别
container:两边留白
container-fluid:两边填满
--%>
<%--页眉部分--%>
<div class="container-fluid">
    <%--表头行--%>
    <div class="top1">
        <a href="${pageContext.request.contextPath}/toIndex">首页</a>
        <a href="https://consumer.huawei.com/cn/" target="_blank">华为官网</a>
        <a href="https://www.honor.cn/" target="_blank">荣耀官网</a>
        <a href="https://club.huawei.com/" target="_blank">花粉俱乐部</a>
        <a href="#">V码（优购码）</a>
        <a href="https://company.vmall.com/" target="_blank">企业购</a>
        <a href="#">Select Region</a>
        <a href="${pageContext.request.contextPath}/toAdmin">管理员登陆</a>
        <a class="icon-dropdown">更多精彩</a>
        <span class="fr">
                 <c:if test="${sessionScope.user==null}">
                     <a href="${pageContext.request.contextPath}/toLogin">你好,请登录</a>
                     <a href="${pageContext.request.contextPath}/toRegister">注册</a>
                 </c:if>

                <c:if test="${sessionScope.user!=null}">
                    <a href="${pageContext.request.contextPath}/check">欢迎回来! ${sessionScope.users.account}</a>
                    <a href="${pageContext.request.contextPath}/toLogin">退出</a>
                    <a href="#">我的订单</a>
                </c:if>

                <c:if test="${sessionScope.loginUser!=null&& sessionScope.loginUser.type==1}">
                    <a href="">后台管理</a>
                </c:if>
                     <a href="#">客户服务</a>
                     <a href="#">网站导航</a>
                     <a href="#">手机版</a>
                     <a href="${pageContext.request.contextPath}/toCart_list">购物车</a>

           </span>
    </div>


    <li class="nav w">
        <ul>
            <li>
               <img src="../../static/shopping/images/cs.jpg"  alt="">
               <img src="../../static/shopping/images/zc.jpg"  alt="">
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/toShop_list">商品展示</a>
                <a href="${pageContext.request.contextPath}/getShop_hot">热销商品</a>
                <a href="#">         </a>
            </li>
            <li>
                <form action="${pageContext.request.contextPath}/selectPhoneByName" method="post">
                    <input style="width: 200px;height: 25px" type="text" name="name" placeholder="请输入手机名称">
                    <input type="submit" class="btn btn-primary" value="搜索">
                </form>
            </li>

<%--            <div class="choice">--%>
<%--                <input type="text" placeholder="请输入关键字" value="${kw }" id="kw"/>--%>
<%--                <input type="button" value="搜索" id="search-btn"/>--%>
<%--            </div>--%>
        </ul>
    </li>
</div>


    <%--轮播图--%>
    <div class="banner">
        <div class="bx w">
            <div class="b-img">
                <a href="javascript:" style="background:url(../../static/shopping/images/b1.jpg) center no-repeat;"></a>
                <a href="javascript:" style="background:url(../../static/shopping/images/b2.jpg) center no-repeat;"></a>
                <a href="javascript:" style="background:url(../../static/shopping/images/b3.jpg) center no-repeat;"></a>
                <a href="javascript:" style="background:url(../../static/shopping/images/b4.jpg) center no-repeat;"></a>
            </div>
            <div class="b-list"></div>
            <a class="bar-left" href="javascript:;"><em></em></a><a class="bar-right" href="javascript:;"><em></em></a>
        </div>
    </div>


    <div class="xin w">
        <ul>
            <li><a href="https://www.vmall.com/product/10086726905036.html"><img
                    src="../../static/shopping/images/p1.png" alt=""></a></li>
            <li><a href="https://www.vmall.com/product/10086013232739.html"><img
                    src="../../static/shopping/images/p2.jpg" alt=""></a></li>
            <li><a href="https://www.vmall.com/product/10086738213745.html"><img
                    src="../../static/shopping/images/p3.png" alt=""></a></li>
            <li><a href="https://www.vmall.com/product/10086664213829.html"><img
                    src="../../static/shopping/images/p4.jpg" alt=""></a></li>
        </ul>
    </div>
</div>
<%--主体部分--%>
<div class="container">
    <div class="gg w"><img src="../../static/shopping/images/gg.jpg" alt=""></div>
    <div class="sj w">
        <h1>手机</h1>
        <a href="https://www.vmall.com/list-75">荣耀V系列</a>
        <a href="https://www.vmall.com/list-285">HUAWEIP系列</a>
        <a href="https://www.vmall.com/list-76">HUAWEIMate系列</a>
        <a href="https://www.vmall.com/list-666">荣耀HONOR系列</a>
        <a href="https://www.vmall.com/list-277">HUAWEInova系列</a>
        <a href="https://www.vmall.com/list-275">华为畅享系列</a>
        <a href="https://www.vmall.com/list-668">荣耀X系列</a>
        <a href="https://www.vmall.com/list-77">荣耀Play系列</a>
        <a href="https://www.vmall.com/list-36">查看更多></a>
        <%--这里先用死的数据代替--%>
        <ul>
            <li><a href="https://www.vmall.com/product/10086891642017.html"><img
                    src="../../static/shopping/images/s1.png" style="width: 230px; height: 290px; border-radius: 13px;"></a>
            </li>
            <li><a href="https://www.vmall.com/product/10086715691479.html"><img
                    src="../../static/shopping/images/s2.png"><h4>HUAWEI P40 Pro 5G</h4>
                <p>预订享好礼</p><span>¥5988</span></a></li>
            <li><a href="https://www.vmall.com/product/10086882694240.html"><img
                    src="../../static/shopping/images/s3.png"><h4>HUAWEI P40 Pro+ 5G</h4>
                <p>预订享好礼</p><span>¥7988</span></a></li>
            <li><a href="https://www.vmall.com/product/10086557426930.html"><img
                    src="../../static/shopping/images/s4.png"><h4>荣耀30</h4>
                <p>50倍超稳远摄</p><span>¥3298</span></a></li>
            <li><a href="https://www.vmall.com/product/10086063422898.html"><img
                    src="../../static/shopping/images/s5.png"><h4>HUAWEI Mate 30E Pro 5G</h4>
                <p>享6期免息</p><span>¥5299</span></a></li>
            <li><a href="https://www.vmall.com/product/10086375798519.html"><img
                    src="../../static/shopping/images/s6.png"><h4>HUAWEI Mate 40 Pro+ 5G</h4>
                <p>享多重权益</p><span>¥8999</span></a></li>
            <li><a href="https://www.vmall.com/product/10086525758727.html?psrojZtzn80pXOBA9ilQjj2iXJ35SkRd"><img
                    src="../../static/shopping/images/s7.png"><h4>荣耀Play4</h4>
                <p>6400万锐力四摄</p><span>¥1999</span></a></li>
            <li><a href="https://www.vmall.com/product/10086842408658.html"><img
                    src="../../static/shopping/images/s8.png"><h4>华为畅享20 Plus</h4>
                <p>购机赠耳机</p><span>¥2299</span></a></li>
            <li><a href="https://www.vmall.com/product/10086091329647.html"><img
                    src="../../static/shopping/images/s9.png"><h4>荣耀X10 Max</h4>
                <p>护眼阳光屏</p><span>¥2099</span></a></li>
            <li><a href="https://www.vmall.com/product/10086063422898.html?cid=125763"><img
                    src="../../static/shopping/images/s11.png"><h4>HUAWEI Mate 30E Pro</h4>
                <p>一站式换新</p><span>¥5299</span></a></li>
            <li><a href="https://www.vmall.com/product/10086775311605.html"><img
                    src="../../static/shopping/images/s12.png"><h4>HUAWEI Mate 30 Pro 5G</h4>
                <p>预订享好礼</p><span>¥5899</span></a></li>
            <li><a href="https://www.vmall.com/product/10086374426533.html"><img
                    src="../../static/shopping/images/s13.png"><h4>HUAWEI Mate 30 RS</h4>
                <p>预订享好礼</p><span>¥12999</span></a></li>
            <li><a href="https://www.vmall.com/product/10086726905036.html"><img
                    src="../../static/shopping/images/s14.png"><h4>HUAWEI Mate 40 Pro</h4>
                <p>预订享好礼</p><span>¥6499</span></a></li>
            <li><a href="https://www.vmall.com/product/10086375798519.html"><img
                    src="../../static/shopping/images/s15.png"><h4>HUAWEI Mate 40 Pro+</h4>
                <p>预订享好礼</p><span>¥8999</span></a></li>
            <li><a href="https://www.vmall.com/product/10086918242357.html"><img
                    src="../../static/shopping/images/s16.png"><h4>HUAWEI Mate 40 RS</h4>
                <p>预订享好礼</p><span>¥11999</span></a></li>
        </ul>
    </div>
    <script>
        function add_card(id) {
            var pid = id;

            var data = {pid: id}
            $.ajax({
                url: "/add_card",
                data: data,
                type: "POST",
                success: function (result) {
                    var res = JSON.stringify(result)
                    if (res == 1) {
                        alert('添加成功')
                    } else if (res == 2) {
                        alert('已经添加')
                    }
                }
            })
        }
    </script>
</div>
<%--页脚部分--%>
<div class="container-fluid">
    <div class="gg2"><img src="../../static/shopping/images/gg2.png" alt=""></div>
    <div class="footer">
       <p>制作团队：晚睡协会</p>
        <p>顾名思义，晚睡协会就是一群喜欢晚睡的人凑在一起组成了一个团队。</p>
    </div>
</div>
</body>
</html>
